/**
 * Created by wb-zhangxin.q on 2016/1/14.
 */
myApp.filter('reverse',function(){
    return function(text){
        //split将字符串转化成数组
        //reverse将数组颠倒
        //join将数组转化成字符串
        return text.split('').reverse().join('|');
    };
});
myApp.controller('adduser',function($scope,HitService){
    console.log($scope.user);
    $scope.user={number:''};
    $scope.submitFrom=function(){
        HitService.addUser($scope.user)
            .then(function(data){
                    window.location='http://localhost:3000/welcome.html'
            })
    }
});